/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * OverallExpressionPanel.java
 *
 * Created on 19-Aug-2011, 14:36:48
 */
package acid.plugin.gui;

import acid.plugin.expression.allpairs.AllPairsExpression;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

/**
 *
 * @author morgan
 */
public class OverallExpressionPanel extends javax.swing.JPanel implements ActionListener {

    /** Creates new form OverallExpressionPanel */
    public OverallExpressionPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();

        setLayout(new java.awt.GridLayout(3, 0));

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setText("Euclidean distance");
        jRadioButton1.setToolTipText("<html>\nGood for experiments where co-expressing genes are likely to be <br>\nco-expressing in the same direction at similar values.\n</html>");
        jRadioButton1.setActionCommand("euclid");
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });
        add(jRadioButton1);

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setText("Pearson correlation");
        jRadioButton2.setToolTipText("<html>Pearson correlation measures the trends in the ways the data changes,<br>\nso is useful for time series data or discovering anti-correlation relationships.</html>");
        jRadioButton2.setActionCommand("pearson");
        add(jRadioButton2);

        buttonGroup1.add(jRadioButton3);
        jRadioButton3.setText("EucPear measure");
        jRadioButton3.setToolTipText("<html>EucPear is the sum of the Euclidean distance and <br>\nPearson's correlation and has many of the advantages of both <br>\nmetrics, but may not be sensitive to small changes.</html>");
        jRadioButton3.setActionCommand("eucpear");
        add(jRadioButton3);
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButton1ActionPerformed
    @Override
    public void actionPerformed(ActionEvent e) {

        AllPairsExpression ape = new AllPairsExpression();
        String file = ape.doStuff(0.05, 2);
        JOptionPane.showMessageDialog(null, "Your file is located at "+file);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    // End of variables declaration//GEN-END:variables
}
